package ai;


/**
 *
 * @author group19
 */
public class NeuralNetLayer {
/*
    private int nrNodes;
	private int inputSize;
    private boolean [] inputs;
	private float[][] weights;


	/**
	 *
	 * @param nodes the number of nodes
	 *
	public NeuralNetLayer(int nodes, int inputSize){
		nrNodes = nodes;
		this.inputSize = inputSize;
		weights = new float[nrNodes][inputSize];
	}

        public NeuralNetLayer(float[][] weights){
		nrNodes = weights.length;
		this.inputSize = weights[0].length;
		this.weights = weights;
	}

        /**
         * This method evaluates the output of one node
         * @param nodeprivate boolean [] inputs
         * @return True/False
         *
        private boolean evaluate(int node) {
            float out = 0;
            for (int i = 0; i < inputs.length; i++) {
                if (inputs[i]) {
                    out += weights[node][i];
                }
            }
            return sigmoid(out);
        }

        /**
         * Sigmoid function
         * @param f
         * @return True/False
         *
        private float sigmoid(float f) {
        	return 1.0 / (1 + BoundNumbers.exp(-1.0 * d));
        }

    	/**
    	 * A threshold function for a neural network.
    	 * @param The input to the function.
    	 * @return The output from the function.
    	 *
    	public double activationFunction(final double d) {
    		return 1.0 / (1 + BoundNumbers.exp(-1.0 * d));
    	}
    	
        /**
         * This method returns the output boolean array from the layer
         * @return
         *
        public boolean [] outputs(boolean [] input) {
            inputs = input;
            boolean [] output = new boolean[nrNodes];
            for (int i = 0; i < nrNodes; i++) {
                output[i] = evaluate(i);
            }
            return output;
        }
        /**
         * Update the weights of the layer
         *
        public void updateWeights(){}

        public float[][] getWeights() {
            return weights;
        }

        public int nrOfNodes() {
            return nrNodes;
        }*/
}
